<?php
$con = mysql_connect("localhost","root","root");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db("comds", $con);
$dateTime = date("Y-m-d",strtotime("-1 day"));

mysql_query("DELETE FROM comds_query_temp WHERE FirstLogin< '2012-04-02' or FirstLogin >'$dateTime'");
mysql_query("delete from comds_query_temp where TotalExp = ''");
mysql_close($con);
?>